-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensor base #15
Sensor base #15
Conversation
Output.txt
Outdated
HIIIIIIIHIIIIIIIHIIIIIIIGot: {"COLOR_SENSOR":{"data":0}} | ||
|
||
Got: {"COLOR_SENSOR":{"data":0},"name":{"data":"INVALID: Abstract Sensor"}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't push this file (git rm --cached)
script.py
Outdated
return | ||
|
||
bot = BaseMiniBot() | ||
bot.turn_clockwise(50) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delet this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entire file
PhysicalObject po = new PhysicalObject("TESTBOT", 50, simvs.getWorld(), 0.4f, 0.0f, 1f, 1f, true); | ||
SimBot simba; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please
|
||
ArrayList<PhysicalObject> pObjs = new ArrayList<>(); | ||
pObjs.add(po); | ||
simvs.processPhysicalObjects(pObjs); | ||
|
||
// Color sensor TODO put somewhere nice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make a github issue for this plz (b4 i merge)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refer to this pullrequest
System.out.println("Exiting\n"); | ||
break; | ||
case "GET": | ||
String name = content.substring(content.indexOf(':') + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define content.substring(content.indexOf(':') + 1); as String value and refer to that string instead of parsing all over the place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as resolved. bingalee D1ngAl33
} | ||
|
||
String prg = value; | ||
BufferedWriter out = new BufferedWriter(new FileWriter("script.py")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edit .gitignore to have line
temp.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and rename to temp.py
int ret; | ||
String line; | ||
while ((line = in.readLine()) != null) { | ||
ret = new Integer(line).intValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can't we just declare int ret here?
} | ||
|
||
String prg = value; | ||
BufferedWriter out = new BufferedWriter(new FileWriter("script.py")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename out to scriptOut
ProcessBuilder pb = new ProcessBuilder("python","script.py"); | ||
Process p = pb.start(); | ||
|
||
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scriptFeedbackInStream
} | ||
|
||
sensors.put(s.getName(),s); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete alen yen file
Fix some compile bugs with imports